package com.allwees.bs.c.module.user.dto;

import com.allwees.bs.c.module.user.entity.MessageEntity;
import com.allwees.core.common.util.reflect.PojoUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 消息dto
 *
 * @author jy2016
 */
@Data
@NoArgsConstructor
//@ApiModel
public class MessageDto implements Serializable {
//	@ApiModelProperty(value = "消息ID")
	private String uuid;

//	@ApiModelProperty(value = "消息类型")
	private Integer type = 0;

//	@ApiModelProperty(value = "消息标题")
	private String title;

//	@ApiModelProperty(value = "内容,文本")
	private String text;

//	@ApiModelProperty(value = "消息link,默认为null")
	private String link;

//	@ApiModelProperty(value = "消息图片地址")
	private String imageUrl;

//	@ApiModelProperty(value = "扩展参数")
	private String params;

//	@ApiModelProperty(value = "是否已读")
	private Boolean markread;

//	@ApiModelProperty(value = "创建时间")
	private Date createdAt;

	public MessageDto(MessageEntity entity) {
		this();
		PojoUtil.copy(this, entity);
	}
}
